#include "animated_graphic.h"

AnimatedGraphic::AnimatedGraphic() : SDLGameObject() {

}

void AnimatedGraphic::Update() {
    current_frame_ = int(((SDL_GetTicks() / (1000 / anim_speed_)) % num_frames_));
}

void AnimatedGraphic::Load(const LoadParams* params) {
    SDLGameObject::Load(params);
    anim_speed_ = params->get_anim_speed();
}
